#include<stdio.h>
#include<string.h>
#include<unistd.h>
#define NUM 101
#define STYLE '#'

int main()
{
  char bar[NUM];
  memset(bar,'\0',sizeof(bar));
  const char* lable="|/-\\";
  int cnt=0;
  while(cnt<=100)
  {
    printf("\033[46;34m%-100s\033[0m[%d%%][%c]\r",bar,cnt,lable[cnt%4]);
    fflush(stdout);
    bar[cnt++]=STYLE;
    usleep(20000);
  }
  printf("\n");
  return 0;
}
